package com.heima.homeservicemanagementsystem.mapper;

import java.util.List;

import com.heima.homeservicemanagementsystem.entity.vo.RoleAuthority;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.heima.homeservicemanagementsystem.entity.SysRole;
import org.apache.ibatis.annotations.Select;

/**
 * 角色表(SysRole)表数据库访问层
 *
 * @author makejava
 * @since 2025-02-27 15:15:14
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    @Select("select permission_id from sys_role_permission where role_id = #{roleId}")
    List<String> getPermissions(@Param("roleId") String roleId);

    boolean deleteCheck(RoleAuthority authority);

    boolean insertCheck(RoleAuthority authority);


    boolean deletentoCheck(RoleAuthority authority);

    void removemeprebyid(@Param("ids") List<String> ids);
}

